<?php
//error_reporting(E_ALL);
error_reporting(E_ALL || ~E_NOTICE);
if(isset($_COOKIE['member']))
	$member = unserialize($_COOKIE['member']);
include('config/kp.config.php');

if(!isset($m))
{
	define('TEMPLATE','common/public/login.tpl');	
}
else
{	
	if(!isset($c))
	{
		if($m == 'manage')
			define('TEMPLATE','common/public/manage.tpl');	
		else
			define('TEMPLATE','common/public/login.tpl');	
	}
	else
		define('TEMPLATE','common/' .$m. '/' .$c.'.tpl');			
}
if(!file_exists(TEMPLATE))
{
	header('content-type:text/html;charset=utf-8');
	echo '视图加载失败，访问拒绝！';
	exit;
}
include (TEMPLATE);
?>